using System;
using UnityEngine;

public class SkinResizeThickness : SkinResizeListener
{
	[Serializable]
	public class EditorReferences
	{
		public Transform upTransform;

		public float minY = 0.2f;

		public float maxY = 2.6f;
		public float tionX=0.0f;
		public float tionZ=0.0f;
	}

	[SerializeField]
	public EditorReferences references = new EditorReferences();

	public override void OnSizeChanged(float ratio)
	{
		if(references.tionX != 0.0f|| references.tionZ!= 0.0f)
		{
			references.upTransform.localPosition = new Vector3(references.tionX, Mathf.Lerp(references.minY, references.maxY, ratio), references.tionZ);
		}
		else
		{
            references.upTransform.localPosition = new Vector3(0f, Mathf.Lerp(references.minY, references.maxY, ratio), 0f);
        }
		
	}
}
